package com.neoCalf.neoCommon.constants;


public class Constants {
    /**
     * 默认申请加好友介绍
     */
    public static final String APPLY_FRIEND_INFO = "我是U";
    /**
     * 默认申请加群介绍
     */
    public static final String APPLY_GROUP_INFO = "申请加入群聊“G”";
    /**
     * checkCode单位60s
     */
    public static long CHECK_CODE_TIME_1MIN = 60L;
    /**
     * 20秒内请求第100次时拒绝并加入黑名单
     */
    public static int LIMIT_REQUEST_20S = 400;

    /**
     * 登录初始化存储用户联系人 key
     */
    public static String USER_CONTACT_LIST_KEY;

    /**
     * 登录初始化存储群组联系人 key
     */
    public static String GROUP_LIST_KEY;

    /**
     * redis前缀
     */
    public static String REDIS_PREFIX;

    /**
     * 心跳redis key
     */
    public static String REDIS_PREFIX_HEART_BEAT;

    /**
     * 黑名单redis key
     */
    public static String REDIS_PREFIX_IP_BLACK_LIST;

    /**
     * token黑名单
     */
    public static String TOKEN_BLANK_LIST;

    /**
     * 系统设置redis key
     */
    public static String REDIS_PREFIX_SYS_SETTING;

    /**
     * 系统设置选择
     */
    public static int SYS_SETTING_CHOOSE = 1;

    /**
     * id长度
     */
    public static int ID_LENGTH = 11;
    /**
     * 手机号验证码key
     */
    public static final String PHONE_CODE_KEY = "phoneCode";
    /**
     * 邮箱验证码key
     */
    public static final String EMAIL_CODE_KEY = "emailCode";
    /**
     * 手机号验证码有效时间
     */
    public static final int PHONE_CODE_EXPIRE = 120;
    /**
     * 邮箱验证码有效时间
     */
    public static final int EMAIL_CODE_EXPIRE = 120;

    /**
     * token-expire 单位 1day
     */
    public static long TOKEN_EXPIRE = 30;

    /**
     * jwt签名
     */
    public static String SECRET_KEY = "J+/0Nr8/LeRpjIXuvhfbFz18RBp99/uHzg+26SPByks=";

    /**
     * .png suffix
     */
    public static final String PNG_SUFFIX = ".png";

    /**
     * .jpg suffix
     */
    public static final String jpg_SUFFIX = ".jpg";

    /**
     * group avatar目录
     */
    public static final String GROUP_AVATAR_DIR = "avatar/group/";

    /**
     * user avatar目录
     */
    public static final String USER_AVATAR_DIR = "avatar/user/";

    /**
     * 上传图片路径
     */
    public static final String UPLOAD_IMAGE_DIR = "upload/image/";

    /**
     * 上传普通文件路径
     */
    public static final String UPLOAD_FILE_DIR = "upload/file/";

    /**
     * 上传音频路径
     */
    public static final String UPLOAD_AUDIO_DIR = "upload/audio/";

    /**
     * 上传视频路径
     */
    public static final String UPLOAD_VIDEO_DIR = "upload/video/";

    /**
     * Cover 目录
     */
    public static final String COVER_IMAGE = "cover/";

    /**
     * origin 目录
     */
    public static final String ORIGIN_IMAGE = "origin/";

    static {
        /*
         * redis
         */
        REDIS_PREFIX = "neoCalf:";
        REDIS_PREFIX_HEART_BEAT = REDIS_PREFIX + "HeartBeat";
        REDIS_PREFIX_IP_BLACK_LIST = REDIS_PREFIX + "ipBlacklist";
        REDIS_PREFIX_SYS_SETTING = REDIS_PREFIX + "sysSetting";
        USER_CONTACT_LIST_KEY = REDIS_PREFIX + "userContactList";
        GROUP_LIST_KEY = REDIS_PREFIX + "groupList";
        TOKEN_BLANK_LIST = REDIS_PREFIX + "tokenBlacklist";
    }
}
